Optimal. Leaf size=47 \[ \frac {2 \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a^2 d}+\frac {\log (\sin (c+d x))}{a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2915, 12, 45}
\begin {gather*} -\frac {\csc ^2(c+d x)}{2 a^2 d}+\frac {2 \csc (c+d x)}{a^2 d}+\frac {\log (\sin (c+d x))}{a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 45
Rule 2915
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\text {Subst}\left (\int \frac {a^3 (a-x)^2}{x^3} \, dx,x,a \sin (c+d x)\right )}{a^5 d}\\ &=\frac {\text {Subst}\left (\int \frac {(a-x)^2}{x^3} \, dx,x,a \sin (c+d x)\right )}{a^2 d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a^2}{x^3}-\frac {2 a}{x^2}+\frac {1}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{a^2 d}\\ &=\frac {2 \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a^2 d}+\frac {\log (\sin (c+d x))}{a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 38, normalized size = 0.81 \begin {gather*} \frac {4 \csc (c+d x)-\csc ^2(c+d x)+2 \log (\sin (c+d x))}{2 a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.27, size = 36, normalized size = 0.77
method | result | size |
derivativedivides | \(\frac {\ln \left (\sin \left (d x +c \right )\right )+\frac {2}{\sin \left (d x +c \right )}-\frac {1}{2 \sin \left (d x +c \right )^{2}}}{d \,a^{2}}\) | \(36\) |
default | \(\frac {\ln \left (\sin \left (d x +c \right )\right )+\frac {2}{\sin \left (d x +c \right )}-\frac {1}{2 \sin \left (d x +c \right )^{2}}}{d \,a^{2}}\) | \(36\) |
risch | \(-\frac {i x}{a^{2}}-\frac {2 i c}{a^{2} d}+\frac {2 i \left (-i {\mathrm e}^{2 i \left (d x +c \right )}+2 \,{\mathrm e}^{3 i \left (d x +c \right )}-2 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{a^{2} d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{2} d}\) | \(95\) |
norman | \(\frac {-\frac {2 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {2 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {1}{8 a d}+\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}+\frac {5 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}-\frac {\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}-\frac {23 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}-\frac {23 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}-\frac {45 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}-\frac {45 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}-\frac {\ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}\) | \(262\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 40, normalized size = 0.85 \begin {gather*} \frac {\frac {2 \, \log \left (\sin \left (d x + c\right )\right )}{a^{2}} + \frac {4 \, \sin \left (d x + c\right ) - 1}{a^{2} \sin \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 55, normalized size = 1.17 \begin {gather*} \frac {2 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 4 \, \sin \left (d x + c\right ) + 1}{2 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} - a^{2} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 52, normalized size = 1.11 \begin {gather*} \frac {\frac {2 \, \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{2}} - \frac {3 \, \sin \left (d x + c\right )^{2} - 4 \, \sin \left (d x + c\right ) + 1}{a^{2} \sin \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.89, size = 104, normalized size = 2.21 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^2\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^2\,d}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{a^2\,d}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {1}{8}\right )}{a^2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________